-- empty 
t = {}
t[1] = 5
t[2] = 4
t[3] = 3
t[4] = 2
t[5] = 1

--table.sort(t, function(a, b) return a < b end)

for i, v in ipairs(t) do print(i, v) end
print("------------------------")

-- sequence
t = {1, 2, 3, 4, 5}

-- mixed
t = {1, 2, 3, 4, a = "a", b = "b", c = "c", "x"}

--table.remove(t, 3)

-- print sequence
for i, v in ipairs(t) do print(i, v) end
print("------------------------")

-- print all key, value pairs
for k, v in pairs(t) do print(k, v) end

print(t[4])

-- table used for data description
config = 
{
    host =
    {
        ip = "192.168.37.5",
        port = 80,
    },
    credentials = 
    {
        user = alice,
        pass = 123456
    }
}

print("------------------------")
print(config.host.ip)
print(config.host.port)




